home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************
- LGBCheckbox
-
- Public domain, by Zig Zichterman.
-
- This class implements 3D checkboxes according to the guidelines
- suggested in _develop_ 15. Some of the drawing code is taken from
- the public domain source accompanying _develop_ 15.
-
- 1.0b5
- 11/28/94 zz add UseHighlightColor(), UseShadowColor()
- 11/27/94 zz add Calc/UseBackgroundColor(), mBackgroundColor
- make mControl a ControlHandle (was ControlRecord*)
- **************************************************************************/
- #pragma once
-
- class LGBCheckbox {
- public :
- static long
- Main(
- short inVariation,
- ControlHandle ioControl,
- short inMsg,
- long ioParam);
-
- // ———— constructor —————————————————————————————————————————————
- protected :
- LGBCheckbox(
- ControlHandle inControl,
- Boolean inUseWFont);
-
- ControlHandle mControl;
- Boolean mUseWFont;
- GrafPtr mWindowPort;
- RGBColor mBackgroundColor;
- RGBColor mHighlightColor;
- RGBColor mShadowColor;
- RGBColor mInactiveFrameColor;
-
- // ———— dispatch —————————————————————————————————————————————————
- protected :
- void
- Draw(
- long inPartCode);
-
- Boolean
- Test(
- Point inHitPt);
-
- void
- CalcCRgn(
- RgnHandle ioRgn);
-
- // ———— Draw —————————————————————————————————————————————————————
- protected :
- void
- DrawBW(void);
-
- void
- DrawColor(void);
-
- void
- DrawColorActive(void);
-
- void
- DrawColorInactive(void);
-
- void
- CalcBoxes(
- Rect &outCheckbox,
- Rect &outTitleBox);
-
- void
- DrawCheckbox(
- const Rect &inCheckbox,
- Boolean inColor = false);
-
- void
- DrawTitle(
- const Rect &inTitlebox,
- Boolean inDim1Bit = false);
-
- void
- CalcColors(void);
-
- void
- UseBackgroundColor(void);
-
- void
- UseHighlightColor(void);
-
- void
- UseShadowColor(void);
-
- void
- UseInactiveFrameColor(void);
- };
-
-